﻿using PoemGame.ComputerAnswer.Shared;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PoemGame.ComputerAnswer.Xml
{
    public class ComputerAnswerJielong : ComputerAnswerBase, IComputerAnswer
    {
        public ComputerAnswerJielong() : base()
        {

        }
        public string Answer(string gamecontext,string lastanswer)
        {
            var lastword = lastanswer.Substring(lastanswer.Length - 1);
            var rows = poemlinedt.Select("LineContent like '" + lastword + "%'");
            if (rows.Count() > 0) return rows[0]["LineContent"].ToString();
            return "";
        }
    }
}
